import attrApi from "@/api/attr"
const state = {
    attrList: [], // 属性列表
}
const mutations = {
    SET_ATTRLIST_DATA(state, attrList) {
        state.attrList = attrList
    }
}
const actions = {
    // 请求属性列表
    async getAttrList({ commit }, { category1Id, category2Id, category3Id }) {
        const res = await attrApi.attrInfoList({ category1Id, category2Id, category3Id })
        // console.log(res);
        commit('SET_ATTRLIST_DATA', res.data)
    }
}
const getters = {

}

export default {
    state,
    mutations,
    actions,
    getters,
}